Many types of input devices are available for performing operations in a computing system, such as buttons or keys, mice, trackballs, joysticks, touch sensor panels, touch screens, and the like. Touch screens, in particular, are becoming increasingly popular because of their ease and versatility of operation as well as their declining price. Touch screens can include a touch sensor panel, which can be a clear panel with a touch-sensitive surface, and a display device such as a liquid crystal display (LCD) that can be positioned partially or fully behind the panel so that the touch-sensitive surface can cover at least a portion of the viewable area of the display device. Touch screens generally allow a user to perform various functions by touching (e.g., physical contact or near-field proximity) the touch sensor panel using a finger, stylus or other object at a location often dictated by a user interface (UI) being displayed by the display device.
When text is input via a touchscreen keyboard, it can be helpful to automatically correct mistakes made by a user. Such functionality is commonly known as autocorrect. An autocorrect system can determine a word that a user intended to type based on characters input by a user and a dictionary of correctly-spelled words. After determining the word the user intended to type, the system can replace the input characters with the word the user intended to type. However, such a system may yield poor results, particularly in a case where additional information such as the context of the word can help to better predict the word the user intended to type.